package com.anita.member.domain.event.member;

import com.anita.member.domain.event.DomainEvent;
import com.anita.member.domain.model.member.Member;
import com.anita.member.domain.model.member.MemberId;
import lombok.Getter;

import java.time.LocalDateTime;

@Getter
public class MemberCreatedEvent extends DomainEvent {
    private final MemberId memberId;
    private final String userName;
    private final String nickName;
    private final String password;
    private final String email;
    private final String phone;
    private final LocalDateTime createdAt;

    public MemberCreatedEvent(Member member) {
        this.memberId = member.getId();
        this.userName = member.getUserName().getValue();
        this.nickName = member.getNickName().getValue();
        this.password = member.getPassword().getValue();
        this.email = member.getEmail().getValue();
        this.phone = member.getPhone().getValue();
        this.createdAt = LocalDateTime.now();
    }
} 